import { TileLayerOptions, TileLayerMethods, GetTileLayerEventFactory } from './base'

/**
 * 天地图图层属性对象
 */
export interface TileLayerTDTOptions extends TileLayerOptions {}

/**
 * 天地图图层事件工厂对象
 */
type TileLayerTDTEventFactory = GetTileLayerEventFactory<TileLayerTDT>

/**
 * 通过此类实现在地图上叠加天地图矢量地图服务，
 * 此接口只支持叠加经纬度投影的矢量地图服务
 */
export interface TileLayerTDT extends TileLayerMethods {
    readonly options: TileLayerTDTOptions;
    readonly FR: string;

    new (opts: TileLayerTDTOptions): TileLayerTDT;

    /**
     * 添加事件监听函数
     */
    addEventListener: <Event extends keyof TileLayerTDTEventFactory>(event: Event, handler: TileLayerTDTEventFactory[Event]) => void;

    /**
     * 移除事件监听函数
     */
    removeEventListener: <Event extends keyof TileLayerTDTEventFactory>(event: Event, handler: TileLayerTDTEventFactory[Event]) => void
}
